package com.yanghs.common.entity.hbm;

import java.io.Serializable;

/**
 * @author yanghs
 * @Description:
 * @date 2018/3/14 21:27
 */
public class RoleAuthority implements Serializable {
    private static final long serialVersionUID = 1L;
    private String id;
    private String roleid;
    private String authorityid;
    //不序列化
    private transient Roleinfo roleinfoByRoleid;
    private transient Authority authorityByAuthorityid;

    public String getId() {
        return id;
    }

    public void setId(String id) {
        this.id = id;
    }

    public String getRoleid() {
        return roleid;
    }

    public void setRoleid(String roleid) {
        this.roleid = roleid;
    }

    public String getAuthorityid() {
        return authorityid;
    }

    public void setAuthorityid(String authorityid) {
        this.authorityid = authorityid;
    }

    @Override
    public boolean equals(Object o) {
        if (this == o) return true;
        if (o == null || getClass() != o.getClass()) return false;

        RoleAuthority that = (RoleAuthority) o;

        if (id != null ? !id.equals(that.id) : that.id != null) return false;
        if (roleid != null ? !roleid.equals(that.roleid) : that.roleid != null) return false;
        if (authorityid != null ? !authorityid.equals(that.authorityid) : that.authorityid != null) return false;

        return true;
    }

    @Override
    public int hashCode() {
        int result = id != null ? id.hashCode() : 0;
        result = 31 * result + (roleid != null ? roleid.hashCode() : 0);
        result = 31 * result + (authorityid != null ? authorityid.hashCode() : 0);
        return result;
    }

    public Roleinfo getRoleinfoByRoleid() {
        return roleinfoByRoleid;
    }

    public void setRoleinfoByRoleid(Roleinfo roleinfoByRoleid) {
        this.roleinfoByRoleid = roleinfoByRoleid;
    }

    public Authority getAuthorityByAuthorityid() {
        return authorityByAuthorityid;
    }

    public void setAuthorityByAuthorityid(Authority authorityByAuthorityid) {
        this.authorityByAuthorityid = authorityByAuthorityid;
    }
}
